
<!DOCTYPE html>
<!--
  Copyright 2011 Google Inc. All Rights Reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<html>
  <head>
    <title>BDU Tools</title>

    <style type="text/css">
      body { font-family: Arial; }
    </style>
	
   	<style type="text/css">
		.mytable {
		border:1px solid #000000;
		border-collapse:collapse;
		width:200px;
		}
		.mytable td{
		border:1px solid #000000;
		}
		.mytable th{
		background:#cccccc;
		border:1px solid #000000;
		}
	</style>
	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
	google.load('visualization', '1', {packages:['table']});
	google.load("visualization", "1", {packages:["corechart"]});
	// Load the Visualization API and the controls package.
    google.load('visualization', '1.0', {'packages':['controls']});
	var clientId = '863565692657.apps.googleusercontent.com';
	var apiKey='AIzaSyCj4FjUE6NDN0wvxZ0npSfAaBjbQaYhEEo';
	var scopes = 'https://www.googleapis.com/auth/fusiontables';
	var tableId='1l_PufObgGFMf4Jr9RncSbsoP8EXQwG-Xj7v7G6c';
	var resp1=null;
	var row;
	var dataTable;
	var isAuth=false;
	var selectedItems=[];
	var respRowId;
	
	//var categoryFilter='Company';
      // Initialize the client, set onclick listeners.
      function initialize() {
        gapi.client.setApiKey(apiKey);
        window.setTimeout(function() { auth(true); }, 1);
      }
	
	//function logOut(){
	//		document.location.href="https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=http://bdutools2611.appspot.com";
	//	}
      // Run OAuth 2.0 authorization.
      function auth(immediate) {
        gapi.auth.authorize({
          client_id: clientId,
          scope: scopes,
          immediate: immediate
        }, handleAuthResult);
      }

      // Handle the results of the OAuth 2.0 flow.
      function handleAuthResult(authResult) {
        if (authResult && !authResult.error) {
			viewTable();
        } 
      }
	function viewTable(){
		/*query("SELECT 'Company Name', Location, Website, 'Contact Name', Email, Phone, "+
				"Content, RFx, Meeting, 'Time of Meeting', Channel, Domain, 'BDU Prime', 'DC Prime', 'Bid Won', Contract FROM "+tableId);*/
		query("SELECT * FROM "+tableId);
	}
	
	function drawTable(){
		if(resp1.rows!=null){
			var tempArray=[];
			for(var k=0; k<=resp1.rows.length; k++)
			{
				tempArray[k]=[];
			}
			tempArray[0][0]='No.';
			for(var k=1; k<resp1.columns.length; k++)
			{
				tempArray[0][k]=resp1.columns[k];
			}
			for(var i=0; i<resp1.rows.length; i++){
				tempArray[i+1][0]=i+1;
				for(var j=1; j<resp1.rows[i].length; j++){
					tempArray[i+1][j]=resp1.rows[i][j];
				}
			}
			dataTable=tempArray;
		}
		
		//draw chart wrapper
		var data = google.visualization.arrayToDataTable(dataTable);
		//alert(data);
		table = new google.visualization.ChartWrapper({
			'chartType': 'Table',
			'containerId': 'table_div',
			'options': {'page':'enable','pageSize':'10' ,'pagingSymbols':{'prev': 'prev', 'next': 'next'}, 'sortAscending':'true'}
		  });
		google.visualization.events.addListener(table, 'select', function() {
		 	var selection = table.getChart().getSelection();
			
			var selected = "";
			for (var i = 0; i < selection.length; i++) {
			  var item = selection[i];
			  if (item.row != null && item.column != null) {
				var str = data.getFormattedValue(item.row, item.column);
				//selectedItems[i]=str;
				//var str=item.row;
				selected +=str+"/";
				
			  } else if (item.row != null) {
				var str = data.getFormattedValue(item.row, 0);
				//var str=item.row;
				//selectedItems[i]=str;
				selected += str+"/";
				
				//alert(selectedItems[i]);
			  } else if (item.column != null) {
			  	//var str=item.row;
				var str = data.getFormattedValue(0, item.column);
				//selectedItems[i]=str;
				selected += str+"/";
			  }
			}
			selectedItems=selected.split("/");
		});
		//Define a StringFilter control for the 'Name' column
		var slctCategoryFilter=document.getElementById('slctCategoryFilter');
		slctCategoryFilter.style.display="block";
		var stringFilter = new google.visualization.ControlWrapper({
			'controlType': 'StringFilter',
			'containerId': 'control1',
			'options': {
			'filterColumnLabel': slctCategoryFilter.value
			 }
		  });
		   // Create the dashboard.
 		 var dashboard = new google.visualization.Dashboard(document.getElementById('dashboard'));
		 dashboard.bind(stringFilter, table);
		 dashboard.draw(data);
		 document.getElementById('editButton').style.display='block';
		 document.getElementById('deleteButton').style.display='block';
	}
	
	function editRow(){
		if(selectedItems!=null){
			if(selectedItems.length>2){
				alert("Please choose only 1 record to edit!");
			}
			else if(selectedItems.length<=1){
				alert("Please choose 1 record to edit!");
			}
				else{
					queryGetOneRow("SELECT * FROM "+tableId+" WHERE Timestamp='"+resp1.rows[selectedItems[0]-1][0]+"'");
				}
		}
		else
			alert("Please choose 1 record to edit!");			
	}
	
	function fillUpdateForm(){
		//alert(row.rows[0][1]);
		document.getElementById('txtCompanyName').value=row.rows[0][1];
		document.getElementById('sltLocation').value=row.rows[0][2];
		document.getElementById('txtWebsite').value=row.rows[0][3];
		document.getElementById('txtContactName').value=row.rows[0][4];
		document.getElementById('txtEmail').value=row.rows[0][5];
		document.getElementById('txtPhone').value=row.rows[0][6];
		document.getElementById('txtContent').value=row.rows[0][7];
		if(row.rows[0][8]=="RFP"){
			document.getElementById('rdoRFP').checked=true;
		}
		else{
			document.getElementById('rdoRFQ').checked=true;
		}
		if(row.rows[0][9]=="Yes"){
			document.getElementById('rdoMeetingYes').checked=true;
		}
		else{
			document.getElementById('rdoMeetingNo').checked=true;
		}
		document.getElementById('dateTimeofMeeting').value=row.rows[0][10];
		document.getElementById('sltChannel').value=row.rows[0][11];
		document.getElementById('txtDomain').value=row.rows[0][12];
		document.getElementById('txtBDUPrime').value=row.rows[0][13];
		document.getElementById('txtDCPrime').value=row.rows[0][14];
		if(row.rows[0][15]=="Yes"){
			document.getElementById('rdoBidWonYes').checked=true;
		}
		else{
			document.getElementById('rdoBidWonNo').checked=true;
		}
		
		if(row.rows[0][16]=="Yes"){
			document.getElementById('rdoContractYes').checked=true;
		}
		else{
			document.getElementById('rdoContractNo').checked=true;
		}
		document.getElementById('dashboard').style.display='none';
		document.getElementById('editForm').style.display='block';
		document.getElementById('cancelButton').onclick=function(){
			document.getElementById('dashboard').style.display='block';
			document.getElementById('editForm').style.display='none';
		};
		
		document.getElementById('updateButton').onclick=function(){
			if(document.getElementById('txtCompanyName').value=="" || document.getElementById('sltLocation').value=="" || document.getElementById('txtContactName').value=="" ||
				document.getElementById('sltChannel').value=="" || document.getElementById('txtDomain').value==""){
				
				alert("Cannot update because of empty value of required field!");
			}
			else
				queryUpdateRowId("SELECT ROWID FROM "+tableId+" WHERE Timestamp='"+row.rows[0][0]+"'");
		};
	}
	
	
	function queryUpdateOneRow(query){
		var lowerCaseQuery = query.toLowerCase();
		var path = '/fusiontables/v1/query';
		var callback = function(element) {
		  return function(resp) {
			selectedItems=null;
		  	viewTable();
		  	document.getElementById('dashboard').style.display='block';
			document.getElementById('editForm').style.display='none';
		  	};
		 }
		 if (lowerCaseQuery.indexOf('select') != 0 &&
            lowerCaseQuery.indexOf('show') != 0 &&
            lowerCaseQuery.indexOf('describe') != 0) {

          var body = 'sql=' + encodeURIComponent(query);
          runClientRequest({
            path: path,
            body: body,
            headers: {
              'Content-Type': 'application/x-www-form-urlencoded',
              'Content-Length': body.length
            },
            method: 'POST'
          }, callback('insert-data-output'));

        }
	}
	
	function updateOneRow(rowId){
		//alert(rowId);
		var isMeeting="";
		var isBidWon="";
		var isContract="";
		var isRFx="";
		if(document.getElementById('rdoRFP').checked==true){
			isRFx=document.getElementById('rdoRFP').value;
		}
		else{
			isRFx=document.getElementById('rdoRFQ').value;
		}		

		if(document.getElementById('rdoMeetingYes').checked==true){
			isMeeting=document.getElementById('rdoMeetingYes').value;
		}
		else{
			isMeeting=document.getElementById('rdoMeetingNo').value;
		}
		
		if(document.getElementById('rdoBidWonYes').checked==true){
			isBidWon=document.getElementById('rdoBidWonYes').value;
		}
		else{
			isBidWon=document.getElementById('rdoBidWonNo').value;
		}
		
		if(document.getElementById('rdoContractYes').checked==true){
			isContract=document.getElementById('rdoContractYes').value;
		}
		else{
			isContract=document.getElementById('rdoContractNo').value;
		}
		
		queryUpdateOneRow("UPDATE "+tableId+" SET "+
		"'Company Name' ='"+document.getElementById('txtCompanyName').value+"',"+
		"'Location' ='"+document.getElementById('sltLocation').value+"',"+
		"'Website' ='"+document.getElementById('txtWebsite').value+"',"+
		"'Contact Name' ='"+document.getElementById('txtContactName').value+"',"+
		"'Email' ='"+document.getElementById('txtEmail').value+"',"+
		"'Phone' ='"+document.getElementById('txtPhone').value+"',"+
		"'Content' ='"+document.getElementById('txtContent').value+"',"+
		"'RFx' ='"+isRFx+"',"+
		"'Meeting' ='"+isMeeting+"',"+
		"'Time of Meeting' ='"+document.getElementById('dateTimeofMeeting').value+"',"+
		"'Channel' ='"+document.getElementById('sltChannel').value+"',"+
		"'Domain' ='"+document.getElementById('txtDomain').value+"',"+
		"'BDU Prime' ='"+document.getElementById('txtBDUPrime').value+"',"+
		"'DC Prime' ='"+document.getElementById('txtDCPrime').value+"',"+
		"'Bid Won' ='"+isBidWon+"',"+
		"'Contract' ='"+isContract+"' "+
		"WHERE ROWID ='"+rowId+"'");
	}
	
	
	function queryUpdateRowId(query){
		var lowerCaseQuery = query.toLowerCase();
		var path = '/fusiontables/v1/query';
		var callback = function(element) {
		  return function(resp) {
		  		if(resp.rows!=null)
		 			updateOneRow(resp.rows[0][0]);
		  	};
		 }
	  runClientRequest({
		path: path,
		params: { 'sql': query }
	  }, callback('select-data-output'));
	}
	
	function queryGetOneRow(query){
		var lowerCaseQuery = query.toLowerCase();
		var path = '/fusiontables/v1/query';
		var callback = function(element) {
		  return function(resp) {
		  		row=resp;
				fillUpdateForm();
		  	};
		 }
	  runClientRequest({
		path: path,
		params: { 'sql': query }
	  }, callback('select-data-output'));
	}

	
	function deleteRows(){
		if(selectedItems!=null){
			if(selectedItems.length>0)
			{
				var r=confirm("Do you want to delete "+(selectedItems.length-1)+" record(s)?");
				if (r==true)
				{
					for(var i=0; i<selectedItems.length-1; i++){
						//alert(resp1.rows[selectedItems[i]-1][0]);
						getMyRowIds(resp1.rows[selectedItems[i]-1][0]);
					}
				}
			}
			else
				alert("Please choose record(s) you want to delete");
		}
		else
			alert("Please choose record(s) you want to delete");
	}
	
	function getMyRowIds(timeStamp){
		//alert(timeStamp);
		queryRowId("SELECT ROWID FROM "+tableId+" WHERE Timestamp='"+timeStamp+"'");
	}
	
	function deleteRow(rowId){
		//alert(rowId);
		queryDeleteRowById("DELETE FROM "+tableId+" WHERE ROWID='"+rowId+"'");
	}
	
	function queryDeleteRowById(query){
		var lowerCaseQuery = query.toLowerCase();
		var path = '/fusiontables/v1/query';
		var callback = function(element) {
		  return function(resp) {
		  		selectedItems=null;
		 		viewTable();
		  	};
		 }
		 if (lowerCaseQuery.indexOf('select') != 0 &&
            lowerCaseQuery.indexOf('show') != 0 &&
            lowerCaseQuery.indexOf('describe') != 0) {

          var body = 'sql=' + encodeURIComponent(query);
          runClientRequest({
            path: path,
            body: body,
            headers: {
              'Content-Type': 'application/x-www-form-urlencoded',
              'Content-Length': body.length
            },
            method: 'POST'
          }, callback('insert-data-output'));

        }
	  
	}
	
	function queryRowId(query){
		var lowerCaseQuery = query.toLowerCase();
		var path = '/fusiontables/v1/query';
		var callback = function(element) {
		  return function(resp) {
			respRowId=resp.rows[0][0];
			deleteRow(respRowId);
		  };
		 } 
	  runClientRequest({
		path: path,
		params: { 'sql': query }
	  }, callback('select-data-output'));
	}
      // Send an SQL query to Fusion Tables.
      function query(query) {
        var lowerCaseQuery = query.toLowerCase();
        var path = '/fusiontables/v1/query';
        var callback = function(element) {
          return function(resp) {
			resp1=resp;
			drawTable();
          };
        }
          runClientRequest({
            path: path,
            params: { 'sql': query }
          }, callback('select-data-output'));
      }

      // Execute the client request.
      function runClientRequest(request, callback) {
        var restRequest = gapi.client.request(request);
        restRequest.execute(callback);
      }
    </script>
     <script src="https://apis.google.com/js/client.js?onload=initialize"></script>
     <link rel="stylesheet" type="text/css" href="../Css file/content.css">
     <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
  </head>
  <body>
    <div>
    <input type="button" id="toggle-button" value="unknown" style="display:none" >
    <div id="current">
       	    <h4>Homepage></h4><h4>Business Enquiry></h4><h4>View as Table</h4>
        </div>
    </div>
	<p id="select-data-output"></p>
     <div id="contact">
	  	<h3>Business Enquiry</h3>
    </div>
    
	<div id='dashboard'>
		<table align="center">
			<tr>
				<td>
					<select id="slctCategoryFilter" onChange="viewTable()" style="display:none">
						<option value="Location"  selected="selected">Location</option>
						<option value="Company Name">Company Name</option>
						<option value="Channel">Channel</option>
						<option value="Domain">Domain</option>
					</select>
				</td>
				<td>
					<div id='control1'></div>
				</td>
			</tr>
		</table>
		<div id='table_div'></div>
		   <div id="table">
                	<div id="table_left">
					<input type="button" onClick="editRow();" value="Edit" style="display:none" id="editButton"/>
                    </div>
					
                    <div id="table_right">
					<input type="button" onClick="deleteRows();" value="Delete" style="display:none" id="deleteButton"/>
                    </div>
           </div> 
	</div>
	
	<!-------------------------------------------------EDIT FORM----------------------------------------------------------------->
    
    <div id="editForm" align="center" style="display:none" >
    	<div id="editForm_title">
        Edit Business Enquiry
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Company Name<font color="#FF0000">*</font>
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtCompanyName">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Location<font color="#FF0000">*</font>
        	</div>
            <div id="editForm_fieldcontent3">
            <select id="sltLocation">
			<option value="United States of America">United States of America</option> <option value="Afghanistan">Afghanistan</option> <option value="Africa">Africa</option> <option value="Albania">Albania</option> <option value="Algeria">Algeria</option> <option value="American Samoa">American Samoa</option> <option value="Andorra">Andorra</option> <option value="Angola">Angola</option> <option value="Anguilla">Anguilla</option> <option value="Antarctica">Antarctica</option> <option value="Antigua &amp; Barbuda">Antigua &amp; Barbuda</option> <option value="Antilles, Netherlands">Antilles, Netherlands</option> <option value="Arabia, Saudi">Arabia, Saudi</option> <option value="Argentina">Argentina</option> <option value="Armenia">Armenia</option> <option value="Aruba">Aruba</option> <option value="Australia">Australia</option> <option value="Austria">Austria</option> <option value="Azerbaijan">Azerbaijan</option> <option value="Bahamas, The">Bahamas, The</option> <option value="Bahrain">Bahrain</option> <option value="Bangladesh">Bangladesh</option> <option value="Barbados">Barbados</option> <option value="Belarus">Belarus</option> <option value="Belgium">Belgium</option> <option value="Benin">Benin</option> <option value="Benin">Benin</option> <option value="Bermuda">Bermuda</option> <option value="Bhutan">Bhutan</option> <option value="Bolivia">Bolivia</option> <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option> <option value="Botswana">Botswana</option> <option value="Bouvet Island">Bouvet Island</option> <option value="Brazil">Brazil</option> <option value="British Indian Ocean Territory">British Indian Ocean Territory</option> <option value="British Virgin Islands">British Virgin Islands</option> <option value="Brunei Darussalam">Brunei Darussalam</option> <option value="Bulgaria">Bulgaria</option> <option value="Burkina Faso">Burkina Faso</option> <option value="Burundi">Burundi</option> <option value="Cambodia">Cambodia</option> <option value="Cameroon">Cameroon</option> <option value="Canada">Canada</option> <option value="Cape Verde">Cape Verde</option> <option value="Cayman Islands">Cayman Islands</option> <option value="Central African Republic">Central African Republic</option> <option value="Chad">Chad</option> <option value="Chile">Chile</option> <option value="China">China</option> <option value="Christmas Island">Christmas Island</option> <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option> <option value="Colombia">Colombia</option> <option value="Comoros">Comoros</option> <option value="Congo">Congo</option> <option value="Congo, Democratic Rep. of the">Congo, Democratic Rep. of the</option> <option value="Cook Islands">Cook Islands</option> <option value="Cote D&#39;Ivoire">Cote D&#39;Ivoire</option> <option value="Croatia">Croatia</option> <option value="Cuba">Cuba</option> <option value="Cyprus">Cyprus</option> <option value="Czech Republic">Czech Republic</option> <option value="Denmark">Denmark</option> <option value="Djibouti">Djibouti</option> <option value="Dominica">Dominica</option> <option value="Dominican Republic">Dominican Republic</option> <option value="East Timor (Timor-Leste)">East Timor (Timor-Leste)</option> <option value="Ecuador">Ecuador</option> <option value="Egypt">Egypt</option> <option value="El Salvador">El Salvador</option> <option value="Equatorial Guinea">Equatorial Guinea</option> <option value="Eritrea">Eritrea</option> <option value="Estonia">Estonia</option> <option value="Ethiopia">Ethiopia</option> <option value="European Union">European Union</option> <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option> <option value="Faroe Islands">Faroe Islands</option> <option value="Fiji">Fiji</option> <option value="Finland">Finland</option> <option value="France">France</option> <option value="French Guiana">French Guiana</option> <option value="French Polynesia">French Polynesia</option> <option value="French Southern Territories - TF">French Southern Territories - TF</option> <option value="Gabon">Gabon</option> <option value="Gambia, The">Gambia, The</option> <option value="Georgia">Georgia</option> <option value="Germany">Germany</option> <option value="Ghana">Ghana</option> <option value="Gibraltar">Gibraltar</option> <option value="Greece">Greece</option> <option value="Greenland">Greenland</option> <option value="Grenada">Grenada</option> <option value="Guadeloupe">Guadeloupe</option> <option value="Guam">Guam</option> <option value="Guatemala">Guatemala</option> <option value="Guernsey and Alderney">Guernsey and Alderney</option> <option value="Guinea">Guinea</option> <option value="Guinea-Bissau">Guinea-Bissau</option> <option value="Guinea, Equatorial">Guinea, Equatorial</option> <option value="Guiana, French">Guiana, French</option> <option value="Guyana">Guyana</option> <option value="Option 101Haiti">Option 101Haiti</option> <option value="Heard and McDonald Islands">Heard and McDonald Islands</option> <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option> <option value="Holland (see Netherlands)">Holland (see Netherlands)</option> <option value="Honduras">Honduras</option> <option value="Hong Kong, China">Hong Kong, China</option> <option value="Hungary">Hungary</option> <option value="Iceland">Iceland</option> <option value="India">India</option> <option value="Indonesia">Indonesia</option> <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option> <option value="Iraq">Iraq</option> <option value="Ireland">Ireland</option> <option value="Ivory Coast">Ivory Coast</option> <option value="Italy">Italy</option> <option value="Jamaica">Jamaica</option> <option value="Japan">Japan</option> <option value="Jersey">Jersey</option> <option value="Jordan">Jordan</option> <option value="Kazakhstan">Kazakhstan</option> <option value="Kenya">Kenya</option> <option value="Kiribati">Kiribati</option> <option value="Korea, Demo. People&#39;s Rep. of">Korea, Demo. People&#39;s Rep. of</option> <option value="Korea, (South) Republic of">Korea, (South) Republic of</option> <option value="Kuwait">Kuwait</option> <option value="Kyrgyzstan">Kyrgyzstan</option> <option value="Lao People&#39;s Democratic Republic">Lao People&#39;s Democratic Republic</option> <option value="Latvia">Latvia</option> <option value="Lebanon">Lebanon</option> <option value="Lesotho">Lesotho</option> <option value="Liberia">Liberia</option> <option value="Libyan Arab Jamahiriya">Libyan Arab Jamahiriya</option> <option value="Liechtenstein">Liechtenstein</option> <option value="Lithuania">Lithuania</option> <option value="Luxembourg">Luxembourg</option> <option value="Macao, (China)">Macao, (China)</option> <option value="Macedonia, TFYR">Macedonia, TFYR</option> <option value="Madagascar">Madagascar</option> <option value="Malawi">Malawi</option> <option value="Malaysia">Malaysia</option> <option value="Maldives">Maldives</option> <option value="Mali">Mali</option> <option value="Malta">Malta</option> <option value="Man, Isle of">Man, Isle of</option> <option value="Marshall Islands">Marshall Islands</option> <option value="Martinique">Martinique</option> <option value="Mauritania">Mauritania</option> <option value="Mauritius">Mauritius</option> <option value="Mayotte">Mayotte</option> <option value="Mexico">Mexico</option> <option value="Micronesia, Federated States of">Micronesia, Federated States of</option> <option value="Moldova, Republic of">Moldova, Republic of</option> <option value="Monaco">Monaco</option> <option value="Mongolia">Mongolia</option> <option value="Montonegro">Montonegro</option> <option value="Montserrat">Montserrat</option> <option value="Morocco">Morocco</option> <option value="Mozambique">Mozambique</option> <option value="Myanmar (ex-Burma)">Myanmar (ex-Burma)</option> <option value="Namibia">Namibia</option> <option value="Nauru">Nauru</option> <option value="Nepal">Nepal</option> <option value="Netherlands">Netherlands</option> <option value="Netherlands Antilles">Netherlands Antilles</option> <option value="New Caledonia">New Caledonia</option> <option value="New Zealand">New Zealand</option> <option value="Nicaragua">Nicaragua</option> <option value="Niger">Niger</option> <option value="Nigeria">Nigeria</option> <option value="Niue">Niue</option> <option value="Norfolk Island">Norfolk Island</option> <option value="Northern Mariana Islands">Northern Mariana Islands</option> <option value="Norway">Norway</option> <option value="Oman">Oman</option> <option value="Pakistan">Pakistan</option> <option value="Palau">Palau</option> <option value="Palestinian Territory">Palestinian Territory</option> <option value="Panama">Panama</option> <option value="Papua New Guinea">Papua New Guinea</option> <option value="Paraguay">Paraguay</option> <option value="Peru">Peru</option> <option value="Philippines">Philippines</option> <option value="Pitcairn Island">Pitcairn Island</option> <option value="Poland">Poland</option> <option value="Portugal">Portugal</option> <option value="Puerto Rico">Puerto Rico</option> <option value="Qatar">Qatar</option> <option value="Reunion">Reunion</option> <option value="Romania">Romania</option> <option value="Russia (Russian Federation)">Russia (Russian Federation)</option> <option value="Rwanda">Rwanda</option> <option value="Sahara">Sahara</option> <option value="Saint Helena">Saint Helena</option> <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option> <option value="Saint Lucia">Saint Lucia</option> <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option> <option value="Saint Vincent and the Grenadines">Saint Vincent and the Grenadines</option> <option value="Samoa">Samoa</option> <option value="San Marino">San Marino</option> <option value="Sao Tome and Principe">Sao Tome and Principe</option> <option value="Saudi Arabia">Saudi Arabia</option> <option value="Senegal">Senegal</option> <option value="Serbia">Serbia</option> <option value="Seychelles">Seychelles</option> <option value="Sierra Leone">Sierra Leone</option> <option value="Singapore">Singapore</option> <option value="Slovakia">Slovakia</option> <option value="Slovenia">Slovenia</option> <option value="Solomon Islands">Solomon Islands</option> <option value="Somalia">Somalia</option> <option value="South Africa">South Africa</option> <option value="S. Georgia and S. Sandwich Is.">S. Georgia and S. Sandwich Is.</option> <option value="Spain">Spain</option> <option value="Sri Lanka">Sri Lanka</option> <option value="Sudan">Sudan</option> <option value="Suriname">Suriname</option> <option value="Svalbard and Jan Mayen Islands">Svalbard and Jan Mayen Islands</option> <option value="Swaziland">Swaziland</option> <option value="Sweden">Sweden</option> <option value="Switzerland">Switzerland</option> <option value="Syrian Arab Republic">Syrian Arab Republic</option> <option value="Taiwan">Taiwan</option> <option value="Tajikistan">Tajikistan</option> <option value="Tanzania, United Republic of&nbsp;">Tanzania, United Republic of </option> <option value="Thailand">Thailand</option> <option value="Timor-Leste (East Timor)">Timor-Leste (East Timor)</option> <option value="Togo">Togo</option> <option value="Tokelau">Tokelau</option> <option value="Tonga">Tonga</option> <option value="Trinidad &amp; Tobago">Trinidad &amp; Tobago</option> <option value="Tunisia">Tunisia</option> <option value="Turkey">Turkey</option> <option value="Turkmenistan">Turkmenistan</option> <option value="Turks and Caicos Islands">Turks and Caicos Islands</option> <option value="Tuvalu">Tuvalu</option> <option value="Uganda">Uganda</option> <option value="Ukraine">Ukraine</option> <option value="United Arab Emirates">United Arab Emirates</option> <option value="United Kingdom">United Kingdom</option> <option value="US Minor Outlying Islands">US Minor Outlying Islands</option> <option value="Uruguay">Uruguay</option> <option value="Uzbekistan">Uzbekistan</option> <option value="Vanuatu">Vanuatu</option> <option value="Vatican City State (Holy See)">Vatican City State (Holy See)</option> <option value="Venezuela">Venezuela</option> <option value="Vietnam">Vietnam</option> <option value="Virgin Islands, British">Virgin Islands, British</option> <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option> <option value="Wallis and Futuna">Wallis and Futuna</option> <option value="Western Sahara">Western Sahara</option> <option value="Yemen">Yemen</option> <option value="Zambia">Zambia</option> <option value="Zimbabwe">Zimbabwe</option> <option value="Other...">Other...</option></select>
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Website
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtWebsite">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Contact Name<font color="#FF0000">*</font>
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtContactName">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Email
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtEmail">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Phone
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtPhone">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Content
        	</div>
            <div id="editForm_fieldcontent3">
            <textarea value="" id="txtContent"></textarea>
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            RFx<font color="#FF0000">*</font>
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="radio" name="rdoRFx" id="rdoRFQ" value="RFQ">RFQ<br>
			<input type="radio" name="rdoRFx" id="rdoRFP" value="RFP">RFP
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Meeting
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="radio" name="rdoMeeting" id="rdoMeetingYes" value="Yes">Yes<br>
			<input type="radio" name="rdoMeeting" id="rdoMeetingNo" value="No">No
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Time of Meeting
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="date" value="" id="dateTimeofMeeting">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Channel<font color="#FF0000">*</font>
        	</div>
            <div id="editForm_fieldcontent3">
            <select id="sltChannel">
                <option value="TMA website">TMA website</option>
                <option value="TMS website">TMS website</option> 
                <option value="TMA email">TMA email</option> 
                <option value="Consulates">Consulates</option> 
                <option value="Phone contact">Phone contact</option>
                <option value="TMA Australia">TMA Australia</option>
                <option value="Association">Association</option>
                <option value="Partner Network">Partner Network</option> 
                <option value="Existing connnection">Existing connnection</option> 
                <option value="Etc">Etc</option>
            </select>
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Domain<font color="#FF0000">*</font>
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtDomain">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            BDU Prime
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtBDUPrime">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            DC Prime
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="text" value="" id="txtDCPrime">
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent1">
            Bid Won
        	</div>
            <div id="editForm_fieldcontent3">
            <input type="radio" name="rdoBidWon" id="rdoBidWonYes" value="Yes">Yes<br>
			<input type="radio" name="rdoBidWon" id="rdoBidWonNo" value="No">No
        	</div>
        </div>
        <div id="editForm_fieldcontent_cha">
        	<div id="editForm_fieldcontent5">
           Contract<font color="#FF0000">*</font>
        	</div>
            <div id="editForm_fieldcontent4">
            <input type="radio" name="rdoContract" id="rdoContractYes" value="Yes">Yes<br>
			<input type="radio" name="rdoContract" id="rdoContractNo" value="No">No
        	</div>
        </div>
        <div id="editForm_submit">
        	<input type="button" id="cancelButton" value="Cancel"/><input type="button" id="updateButton" value="Update"/>
        </div>
    </div>
  </body>
</html>

